Android 次期バージョン N は Oracle Java を使わないのか?

Diff_-_51b1b6997fd3f980076b8081f7f1165ccc2a4008^__-_platform_libcore_git_-_Git_at_Google

技術ネタ満載の YCombinator の運営する「Hacker News」で昨日から話題になっています.

Google confirms next Android version won’t use Oracle’s proprietary Java APIs | Hacker News

このへん素人目にも想像できるのは「著作権料を払いたくない」という理由.

So in order for Google to avoid paying that royalty going forward they need to move to OpenJDK quickly with their next release, with the belief that using Oracle's GPL JDK implementation also gives them a license to the API (which is somehow separately copyrightable? The Federal Circuit is a mess).

ここらの適用範囲などの法律の話は金額のわりに明快でなく庶民には分かりづらい.

実際, 開発中のソースコードではどのようになってきているのか.

Mysterious Android codebase commit | Hacker News

This diff is more explicit about what's going on:
https://android.googlesource.com/platform/libcore.git/+/aab9...
Change dependency from libart -> libopenjdkjvm.
There are also diffs adding lambda support, tweaking various classes for compatibility with applications that use reflection to access internal capabilities, and fixing lots OpenJDK compatibility bugs.

確かに, OpenJDK に移行してるようにも見えるが.

In the context of the recent juniper attack where some unauthorized code was committed without anybody noticing for years, it seems like it would be easy to hide a backdoor in such a big commit.
How do you go about checking the integrity of the code when you have so many files?
8902 files were changed, most added, and the commit says it's just importing openJDK files. Is there anybody checking that the source file imported haven't been modified to include some kind of backdoor?

はっきり「OpenJDKに移行を進めている」とは言い切れないのか.

WEBでは見づらいのでアプリで.

Hacker News Reader (翻訳) - Google Play の Android アプリ


Genymotion で Marshmallow

「Preview」ということですが.

Virtual_device_creation_wizard

Genymotion_for_personal_use_-_PREVIEW_-_Google_Nexus_5X_-_6_0_0_-_API_23_-_1080x1920__1080x1920__420dpi__-_192_168_58_101

とりあえずは動く.

Genymotion

[GUIDE] Genymotion | Installing ARM Translat… - Pg. 13 | Android Development and Hacking | XDA Forums


そのメソッド細かすぎぢゃね?

再利用されない粒度の細かいメソッドは必要なのか.

- 長過ぎるメソッド
- コメントがなければ目的が分からないメソッド

以下のサンプル.

void printOwing(double amount) {
  printBanner();
  System.out.println(“name:” + _name);
  System.out.println(“amount:” + amount);
}

をこうする.

void printOwing(double amount) {
  printBanner();
  printDetails(amount);
}

void printDetails(double amount) {
  System.out.println(“name:” + _name);
  System.out.println(“amount:” + amount);
}

うまく命名された細かいコードが好ましい理由

- 他のメソッドから使える可能性が増える
- 上位のメソッドがコメントのように読める
- オーバーライドしやすい

その他

- 良い名前がつけられないと有効ではない
- 抽出されるコードよりメソッド名が長くてもよい
- 大きなメソッドに慣れていると慣れるまで時間がかかる

「明快さが向上するならそうすれば良い」

シンプルなサンプルコードに対してやけに気にかかる言葉が連続する.

以下から抜粋.

Refactoring

Martin Fowler


Chromecast の パソコン版の設定アプリはもう使えない?

ネットワークの設定変更をしようとしたのですが.

きっと使えないのでしょう.

Chromecast_App

Chromecastアプリのバージョンが古すぎます
最新バージョンに更新してください。

と表示されて, 更新しても, しなくても, 以前利用できた「設定」ボタンクリックで進むことができません.

同じメッセージの繰り返しです.

このパソコン版の設定アプリの以下のような旧ダウンロードページ.

Chromecast_old

今では, この画面からもう「パソコン版の設定アプリ」は姿を消しているようです.

Chromecast

Chromecast

ということは, もうパソコンのみでは使えないということかな.


最近の「Android System WebView」で追加されている機能

少しWebViewのまわりの挙動が変化している気がしたので調べてみた.

これ.

20151011-142959

AndroidシステムのWebView - Google Play の Android アプリ

Android 5.0 以降に対して, コンポーネントとしてのWebViewを切り離してPlayStoreで更新していくというもの.

このパッケージを入れている場合と入れてない場合の WebView にどれくらい差がでてきているのか.

Android 5.1 実機で簡単に機能を比べる.

…
mWebView = (WebView) findViewById(R.id.web_view);
mWebView.getSettings().setJavaScriptEnabled(true);
mWebView.loadUrl("https://html5test.com/");
…

HTML5test - How well does your browser support HTML5?

入れていない場合.

20151011-143135

入れている場合.

20151011-143336

10ポイント以上の差がある.

ポイントの大きなもの順に追加された機能をみる.

Service Workers (+10)

20151011-143539

Service Workers Nightly

Introduction to Service Worker: How to use Service Worker - HTML5 Rocks

Service Workerは、最近動きのあるブラウザテクノロジーの中で最もホットな新機能の一つです。ネットワークプロキシとしても働くService Workerは、従来のAppCacheの欠点を克服し、真のオフラインファーストを実現できる技術として期待されています。

そんな今大注目の Service Workerですが、実はAppCacheの代用用途だけでなくバックグラウンドのコンテンツ同期やプッシュ通知などの応用が検討されています。

Service WorkerとHTTP/2が切り開く新しいWeb Pushの世界 - ぼちぼち日記

Clipboard API and events (+5)

20151011-143855

Clipboard API and events

Readable streams (+3)

20151011-144101

Streams Standard

Content Security Policy 1.1 (+2)

20151011-144308

Content Security Policy Level 2

セキュリティ上の機能だけでなく, コンテンツ同期やプッシュ通知, クリップボードやストリーム配信関連機能などアプリ利用者に直接影響するものが追加されているようです.

多数のAndroidユーザーにも分かりやすい「入れておいたほうがいいアプリ」となってくるのだろうと思います.

AndroidシステムのWebView - Google Play の Android アプリ