308614 Commits

Author SHA1 Message Date
Aurimas Liutikas
4f911e1c5a Merge "Fix toggling of AM/PM of TimePicker using hardware keyboard." 2017-02-23 04:52:07 +00:00
Yohei Yukawa
3dd5fbc569 Fix an unintentional switch-case fall-through
This is a follow up CL to my previous CL [1], which introduced a
classical fall through bug due to a missing return statement.

 [1]: Ic614f112f960382280acd8891b3af56d47679f08
      ce82eb2d865e5ee1b69705ca7a0aedd0e92d0d4e

Test: Manually made sure that calling
      InputConnection#performPrivateCommand() no longer causes
      IllegalStateException("Already recycled.").
Bug: 35079353
Fixes: 35681994
Change-Id: I9aa3c0497385e053718d829aad49495771b22b59
2017-02-22 20:49:10 -08:00
Yohei Yukawa
75af69c9f7 Merge "Optimize IMMS.MyPackageMonitor more" 2017-02-23 04:46:14 +00:00
Phil Weaver
263340cfb1 Merge "Remove abstract from AccessibilityService methods" 2017-02-23 04:40:18 +00:00
TreeHugger Robot
4bc511cb66 Merge "VideoView: option for audio focus, support for AudioAttributes" 2017-02-23 04:37:54 +00:00
TreeHugger Robot
798cccb659 Merge "Don't copy ringtones when profile sync goes off" 2017-02-23 04:21:39 +00:00
Chen Xu
44fa5c3346 Merge "renaming telephony internal hidden intents" am: 09c663a84c am: 979e4690ec
am: 201320492c

Change-Id: I4e37359a98fb8ecdff63b45a54f08b61e7be25ad
2017-02-23 04:15:28 +00:00
Brad Ebinger
3051510d60 resolve merge conflicts of ac9b2c4fab42 to stage-aosp-master am: 4fb8988854
am: 609cfc916b  -s ours

Change-Id: Ib912a18c3bea70d268cc6fa8e3de8bbb9fd414b0
2017-02-23 04:11:20 +00:00
TreeHugger Robot
0f09817859 Merge "OMS: integrate OverlayManagerService into framework" 2017-02-23 03:59:01 +00:00
Adam Lesinski
b5dc4bd49a AAPT2: Few tweaks to get shared-libraries working
Test: manual (building shared support library demo)
Change-Id: I4730645aa92ba1893baf67ffe35fbd4aac0f8e46
2017-02-22 19:54:43 -08:00
TreeHugger Robot
a497770920 Merge "resolve merge conflicts of f17c1d488840 to master" 2017-02-23 03:44:00 +00:00
TreeHugger Robot
26a449e62a Merge "Reconcile apps in 2 phases" 2017-02-23 03:42:24 +00:00
Jeff Sharkey
6f2c1ea250 Merge "Add queryStatsForPackage() API." 2017-02-23 03:21:47 +00:00
Jeff Sharkey
415da7d245 Merge "Start locking down /data/media access." 2017-02-23 03:21:22 +00:00
Jeff Sharkey
4f6188e775 Merge "Slowly deprecate hidden getPackageSizeInfo() API." 2017-02-23 03:21:07 +00:00
TreeHugger Robot
e9d8fa11b6 Merge "Fix concurrent modification crash in onAlarm" 2017-02-23 03:19:36 +00:00
Abhishek Adappa
2134e14bda Add a new ImsReasonInfo code
For IKEv2 authentication failure during ePDG tunnel establishment.

Test: make
Change-Id: I1d10efac806abfaa80d9875b908385f7732f293a
2017-02-22 19:16:58 -08:00
Felipe Leme
c01a873c4f Added sanitization for CompoundButton and RadioGroup.
Bug: 33269702
Bug: 33550221
Test: CtsAutoFillServiceTestCases (with new tests) pass

Change-Id: Ie2c8d2784227371588aa02973b8ef3ac1a6950aa
2017-02-22 19:15:38 -08:00
TreeHugger Robot
d55e21edaa Merge "Add missing sound to important channels." 2017-02-23 02:55:02 +00:00
Robin Lee
7af9a74431 Don't copy ringtones when profile sync goes off
Experimentally, it makes more sense to more people to have the parent
setting as an overlay not a concrete thing.

Test: make cts -j30 && cts-tradefed run cts --module CtsDevicePolicyManagerTestCases --test 'com.android.cts.devicepolicy.ManagedProfileTest#testRingtoneSyncAutoDisableRingtone' </dev/null 2>&1
Bug: 34730524
Change-Id: I5f804713def9e54921b90e4f5cea742ba8aaa685
2017-02-23 02:47:24 +00:00
TreeHugger Robot
0e9acb53bd Merge "Add "Use open Wi-Fi automatically" setting." 2017-02-23 02:37:26 +00:00
Yifan Hong
4e66d1e40c Merge "context_hub HAL uses "default" service name" 2017-02-23 02:34:36 +00:00
Chen Xu
201320492c Merge "renaming telephony internal hidden intents" am: 09c663a84c
am: 979e4690ec

Change-Id: I8cce065cc9ce6a87fa0ce9753a5e9170da77da59
2017-02-23 02:08:33 +00:00
Chen Xu
979e4690ec Merge "renaming telephony internal hidden intents"
am: 09c663a84c

Change-Id: Ic20ae9e6816d629c979859a7d18f1827bafcc034
2017-02-23 02:03:00 +00:00
Yohei Yukawa
5e3e8a5205 Optimize IMMS.MyPackageMonitor more
This CL is a follow up CL to my previous CL [1] that aimed to reduce
false positives in InputMethodManagerService.MyPackageMonitor when
deciding if InputMethodManagerService (IMMS) needs to rebuild the list
of enabled IMEs or not.

Currently IMMS.MyPackageMonitor#onSomePackagesChanged() gets called
back to trigger IMMS#buildInputMethodListLocked() when either the
following rule A or B is fulfiled.

 A. Intent with one of the following actions for any package name:
    - ACTION_PACKAGE_ADDED
    - ACTION_PACKAGE_REMOVED
    - ACTION_EXTERNAL_APPLICATIONS_AVAILABLE
    - ACTION_EXTERNAL_APPLICATIONS_UNAVAILABLE
    - ACTION_PACKAGES_SUSPENDED
    - ACTION_PACKAGES_UNSUSPENDED
 B. ACTION_PACKAGE_CHANGED with a package that is included in the
    known IME package list, which can be obtained from PackageManager.

The previous CL [1] addressed Bug 28181208 by introducing the rule B,
but we can actually apply the same optimization for A, except for one
false negative case where an appearing package that is not in the
known IME package list actually contains one or more
InputMethodService.

In short, we can reduce false positives by replacing the above two
rules with the following two rules.

 A. Intent with one of the following actions for any package name that
    is in the known IME package list:
    - ACTION_PACKAGE_ADDED
    - ACTION_PACKAGE_CHANGED
    - ACTION_PACKAGE_REMOVED
    - ACTION_EXTERNAL_APPLICATIONS_AVAILABLE
    - ACTION_EXTERNAL_APPLICATIONS_UNAVAILABLE
    - ACTION_PACKAGES_SUSPENDED
    - ACTION_PACKAGES_UNSUSPENDED
 B. Intent with one of the following actions for any package that
    implements at least one InputMethodServivce.
    - ACTION_PACKAGE_ADDED
    - ACTION_EXTERNAL_APPLICATIONS_AVAILABLE

Basically in the rule A PackageManager gives us the list of relevant
package names that might contain IMEs regardless enabled/disabled
state, and such a list works well to filter out irrelevant
notifications except for one case where a new package is adding one
or new IMEs that we did not know. This is why we also need the rule B.

Even though the rule B requires a secondary query to PackageManager,
it can be done outside of the state lock of IMMS.

 [1]: I7b69c349318ce06a48d03a4468cf2c45bfb73dc2
      c4e4491735ad5614ec4592fae98f05c455f5944d

Test: Manually verified as follows.
       1. tapas ShortcutDemo && make -j
       2. Copy ShortcutDemo.apk to the current directory.
       3. adb shell dumpsys input_method | grep mMethodMapUpdateCount=
           to check the "mMethodMapUpdateCount".
       4. adb install -r ShortcutDemo.apk
       5. adb shell dumpsys input_method | grep mMethodMapUpdateCount=
           to make sure "mMethodMapUpdateCount" remains unchanged.
       6. adb install -r ShortcutDemo.apk
       7. adb shell dumpsys input_method | grep mMethodMapUpdateCount=
           to make sure "mMethodMapUpdateCount" remains unchanged.
       8. adb uninstall com.example.android.pm.shortcutdemo
       9. adb shell dumpsys input_method | grep mMethodMapUpdateCount=
           to make sure "mMethodMapUpdateCount" remains unchanged.
Test: Manually verified as follows.
       1. tapas SoftKeyboard && make -j
       2. Copy SoftKeyboard.apk to the current directory.
       3. adb root
       4. adb install -r SoftKeyboard.apk
       5. adb shell dumpsys input_method
           Make sure that
             com.example.android.softkeyboard/.SoftKeyboard
           is recognized by IMMS.
       6. adb shell pm disable com.example.android.softkeyboard/.SoftKeyboard
       7. adb shell dumpsys input_method
           Make sure that
             com.example.android.softkeyboard/.SoftKeyboard
           is no longer recognized by IMMS.
       8. adb shell pm enable com.example.android.softkeyboard/.SoftKeyboard
       9. adb shell dumpsys input_method
           Make sure that
             com.example.android.softkeyboard/.SoftKeyboard
           is recognized by IMMS again.
Fixes: 35361128
Change-Id: I063688297156188f68fe0b55a46d72f2e811dc88
2017-02-23 01:58:28 +00:00
Chen Xu
09c663a84c Merge "renaming telephony internal hidden intents" 2017-02-23 01:55:25 +00:00
John Reck
37dfb42992 Fix concurrent modification crash in onAlarm
Change-Id: Idfd094f3c9ea59356440d6851ccd5abda36ca6ba
Fixes: 35640585
Test: manual; after boot, opened the power menu to force
system_server to spin up a ThreadedRenderer instance
(and thus register itself as a callback on GraphicsStatsService).
Then manually set the date forward by a day to trigger onAlarm
and verified the system didn't reboot/crash. A systrace capture
verified that the alarm fired and package:android (system_server)
had a log rotation event.
2017-02-22 17:19:13 -08:00
Aurimas Liutikas
c51c5f29fb Fix toggling of AM/PM of TimePicker using hardware keyboard.
Set AM/PM mode before setting hour in TextInputTimePickerView. This is
needed so we know exactly which it is when we are using 12 hour clock.
Not setting it early was causing TextInputTimePickerView to update TimePicker
with the hour that was not offset correctly based on AM/PM state.

Test: existing tests caught this - TimePickerTest#testKeyboardInputModeClockAmPm
      verified locally that this test now passes.
Bug: 35262830

Change-Id: I7e912320cb5a72c5d9d4e80dc0b42deb651f2636
2017-02-22 17:00:30 -08:00
Brad Ebinger
21013dcf1b reates base implementation of ImsService AIDLs
This change introduces "base classes" of the AIDL interfaces that are
implemented in vendor provided ImsServices. This allows for new APIs
to be added to the AIDL files, along with stub implementation of those
AIDLs in the base classes. By extending from the base class, older
implementations of the AIDL interfaces will not need to be updated
when the interface changes.

This change also moves some of the com.android.ims classes from
frameworks/opt/net/ims to frameworks/base. Any class that will be
used in the new unbundled ImsService system will need to be in
the framework, as opposed to the optional library that they are
in now.

Bug: 30290416
Test: Manual
Change-Id: I4a186d8e910d6d4f711e983ec8d717fc5cbdefab
2017-02-22 16:58:50 -08:00
Brad Ebinger
609cfc916b resolve merge conflicts of ac9b2c4fab42 to stage-aosp-master
am: 4fb8988854

Change-Id: Ic679f452ad245cbe58ea8069c34c15e50ee9e5c2
2017-02-23 00:57:23 +00:00
Daniel Nishi
4058a84e6b Add metric for new storage screen.
Bug: 34715777
Test: None here -- used in topic.

Change-Id: Icffecd5abba197d544a1f9bd382d5c09b0bbb388
2017-02-22 16:53:06 -08:00
Sudheer Shanka
3b264fa2af Merge "Fix build." 2017-02-23 00:11:38 +00:00
Felipe Leme
d09ccb8db6 Added auto-fill support for Spinner.
Spinner is a special kind of list-value field because its auto-fillable
values are not currently present in the assist structure: this change
adds a getAutoFillOptions() to fill that void, and implements the
auto-fill APIs on Spinner.

It also fixes RadioGroup.getAutoFillValue() - it should return the index
of the child, not its resource id.

Bug: 33550221
Test: CtsAutoFillServiceTestCases (with new tests) pass
Change-Id: I625e7dd705fade56fda490fcd3c4446c0c245ee1
2017-02-22 16:09:50 -08:00
Brad Ebinger
4fb8988854 resolve merge conflicts of ac9b2c4fab42 to stage-aosp-master
Change-Id: I4a6094c41ab267f89a15c5e8caa25e6b683419d0
2017-02-22 16:04:39 -08:00
Svetoslav Ganov
6699538fb6 Merge "Fix a memory leak in AutoFillManager" 2017-02-23 00:02:56 +00:00
TreeHugger Robot
fc5cbc90cf Merge "TelephonyManager#setAllowedCarriers: comment update" 2017-02-22 23:58:24 +00:00
Felipe Leme
7be469ad9d Merge "Fixed missing auto-fill save callbacks on TextView." 2017-02-22 23:56:47 +00:00
Fyodor Kupolov
cd824ef389 Reconcile apps in 2 phases
During boot app data folders are reconciled in 2 phases:
 - in the constructor only core apps are reconciled. prepareAppData
   for remaining apps is deferred and run on a separate thread (phase 2)
 - Phase 2 must finish before third-party apps can start

Also moved GC to final stages of system server init. GC alone takes ~200 ms.

Overall boot time improvement: ~1 second

Before:
02-17 18:33:33 D/BaseBootTest: successive-boot :
28835.0,29638.0,30205.0,29793.0,29752.0,28228.0,30125.0,28983.0,28487.0,28865.0,
02-17 18:33:33 D/BaseBootTest: successive-boot_avg : 29291.1
02-17 18:33:33 D/BaseBootTest:
SystemServerTiming_StartPackageManagerService :
3150.0,3615.0,3515.0,3495.0,3814.0,3158.0,3746.0,3274.0,3222.0,3607.0,
02-17 18:33:33 D/BaseBootTest:
SystemServerTiming_StartPackageManagerService_avg : 3459.6
02-17 18:33:33 D/BaseBootTest: SystemServerTiming_StartServices :
8244.0,8863.0,9035.0,9832.0,8998.0,8096.0,8719.0,8209.0,8279.0,8754.0,
02-17 18:33:33 D/BaseBootTest: SystemServerTiming_StartServices_avg :
8702.9

After:
02-17 17:59:51 D/BaseBootTest: successive-boot :
27711.0,27607.0,28408.0,28968.0,28397.0,28063.0,27885.0,28483.0,27917.0,29317.0,
02-17 17:59:51 D/BaseBootTest: successive-boot_avg : 28275.6
02-17 17:59:51 D/BaseBootTest:
SystemServerTiming_StartPackageManagerService :
2467.0,2489.0,2369.0,2548.0,2647.0,2523.0,2497.0,2553.0,2482.0,2657.0,
02-17 17:59:51 D/BaseBootTest:
SystemServerTiming_StartPackageManagerService_avg : 2523.2
02-17 17:59:51 D/BaseBootTest: SystemServerTiming_StartServices :
7686.0,7538.0,7598.0,7869.0,7884.0,7950.0,7971.0,8370.0,7696.0,7885.0,
02-17 17:59:51 D/BaseBootTest: SystemServerTiming_StartServices_avg :
7844.7

Test: manual
Bug: 28750609
Change-Id: I3543ef577af1365394775318e40907584ddbe950
2017-02-22 15:43:50 -08:00
Daniel Nishi
5840f4238f Merge "Add a flag to enable/disable the cache quota calc." 2017-02-22 23:39:34 +00:00
Calvin On
a91e5368f0 resolve merge conflicts of f17c1d488840 to master
OCL: http://ag/1932572

Test: refactoring CL, with unit tests

Change-Id: I5da27ee70afb8bf6e5fe9f6f3b545cd26d5c8d20
2017-02-22 15:36:53 -08:00
Jeff Sharkey
bfaaa44f27 Slowly deprecate hidden getPackageSizeInfo() API.
It was never a public API, and we now have a support and CTS tested
public API over at StorageStatsManager that apps should be using.

Test: builds, boots
Bug: 34643504
Change-Id: Iad3f2c000dd9d7c1b1e70d0bf2d281826737322e
2017-02-22 16:27:43 -07:00
Sudheer Shanka
984c0ebd83 Fix build.
Test: make -j48 tests
Change-Id: I51287ddae3c7c689a44ca45edbae838e90b88e98
2017-02-22 15:27:29 -08:00
Brad Ebinger
ac9b2c4fab Merge "Add UI prompt for MMI code failure on 3gpp" 2017-02-22 23:22:07 +00:00
Amin Shaikh
a70bc57ef9 Add a disabled reason for recommendation providers
Display a message indicating that a saved networks has not been
automatically connecting due to low quality if
WifiConfiguration#mNotRecommended is set.

Bug: 34745259
Bug: 35671673
Test: m RunSettingsLibRoboTests && runtest frameworks-wifi
Change-Id: I275e2711da68715fb6d92bf954e9f58a3386b1f4
Merged-In: I275e2711da68715fb6d92bf954e9f58a3386b1f4
2017-02-22 15:18:28 -08:00
Makoto Onuki
18280782bc Temporarily whitelist apps known to hit the wtf case
Bug: 34973771
Test: Manual tests with hangouts

Change-Id: If456649cb90164562cd71503119625454590d60d
2017-02-22 15:07:14 -08:00
Jeff Sharkey
373d01766f Add queryStatsForPackage() API.
This gives developers a way to collect package-level stats, even if
it means we have to use manual calculation for sharedUserId apps.

Also round size of storage devices to nice power-of-two values so we
do a better job of matching retail packaging.

Test: builds, boots
Bug: 35294241
Change-Id: I24946c443bb9dc4b0411a8149a0656702ac1fd24
2017-02-22 15:48:51 -07:00
Jeff Sharkey
53d64fc839 Start locking down /data/media access.
The new sdcardfs filesystem requires that we have stricter access
controls around /data/media style locations.  Start by taking away
the "media_rw" GID from apps requesting the WRITE_MEDIA_STORAGE
permission.

Common use-cases like music playback appear to continue working fine,
as clients should only be attempting to use /data/media paths after
calling maybeTranslateEmulatedPathToInternal().

Test: builds, boots, music playback works
Bug: 35447080
Change-Id: Iba9f3ef41d3277c75497f675a1fe6d3406cf4542
2017-02-22 15:48:46 -07:00
Calvin On
f17c1d4888 Replace WearWifi/Cell services with WearConnectivityService am: 5555bccc70
am: abfd5bccb9

Change-Id: If051c765d3ea81cce2bedc2dfa02d64744088054
2017-02-22 22:48:23 +00:00
Sudheer Shanka
f764962b0d Merge "Revert "Ensure network connectivity on app start."" 2017-02-22 22:47:56 +00:00
Calvin On
abfd5bccb9 Replace WearWifi/Cell services with WearConnectivityService
am: 5555bccc70

Change-Id: I5d8c97b8d5c394aeae99b7ddbe0dfdd5706a4293
2017-02-22 22:41:41 +00:00