summaryrefslogtreecommitdiff
path: root/tools/aapt2/java/JavaClassGenerator_test.cpp
diff options
context:
space:
mode:
authorYohei Yukawa <yukawa@google.com>2016-08-11 11:00:23 -0700
committerYohei Yukawa <yukawa@google.com>2016-08-11 11:00:23 -0700
commited841cbdd709d3874506510fd774d961be711f31 (patch)
treefe61a1b371bc7cbe6fa16c326685f8e210adafd2 /tools/aapt2/java/JavaClassGenerator_test.cpp
parent0b26adbb8b42168d4fc5ef240b1e2730fcfd5c61 (diff)
Make View#isTemporarilyDetached() less confusing
In Android N, View#isTemporarilyDetached() returns true if it is called when the same View instance is handling View#onFinishTemporaryDetach(). Returning true there is, however, sometimes confusing, especially scenarios like the following case: @Override public void onFinishTemporaryDetach() { doSomeRestoringWorks(); } private void doSomeRestoringWorks() { doSomething(); } private doSomething() { if (isTemporarilyDetached()) { // As of N, we hit here if this is called as a result of // View#onFinishTemporaryDetach(). } else { // but is the logic here is more likely to be appropriate // when handling View#onFinishTemporaryDetach()? } } What this CL aims to do is to let View#isTemporarilyDetached() return false when it is called while handling View#onFinishTemporaryDetach(), because it should make View#onFinishTemporaryDetach() more useful. Regarding the app compatibility, View#isTemporarilyDetached() was added in API 24 hence the impact on this change is still limited. Bug: 30791718 Change-Id: If384da9f9e6ff849598896901626fd021bae5cda
Diffstat (limited to 'tools/aapt2/java/JavaClassGenerator_test.cpp')
0 files changed, 0 insertions, 0 deletions