Loading AndroidManifest.xml +17 −1 Original line number Diff line number Diff line Loading @@ -95,10 +95,26 @@ </intent-filter> </activity> <receiver android:name=".UninstallEventReceiver" android:permission="android.permission.INSTALL_PACKAGES" android:exported="true"> <intent-filter android:priority="1"> <action android:name="com.android.packageinstaller.ACTION_UNINSTALL_COMMIT" /> </intent-filter> <intent-filter> <action android:name="android.intent.action.BOOT_COMPLETED" /> </intent-filter> </receiver> <activity android:name=".UninstallUninstalling" android:excludeFromRecents="true" android:theme="@style/AlertDialogActivity" android:exported="false" /> <receiver android:name=".UninstallFinish" android:exported="false" /> <activity android:name=".UninstallAppProgress" <activity android:name=".television.UninstallAppProgress" android:configChanges="mnc|mnc|touchscreen|navigation|screenLayout|screenSize|smallestScreenSize|orientation|locale|keyboard|keyboardHidden|fontScale|uiMode|layoutDirection|density" android:exported="false" /> Loading res/layout/app_details.xml→res/layout-television/app_details.xml +0 −0 File moved. View file res/layout/uninstall_progress.xml→res/layout-television/uninstall_progress.xml +0 −0 File moved. View file res/values/strings.xml +2 −0 Original line number Diff line number Diff line Loading @@ -100,6 +100,8 @@ <string name="app_not_found_dlg_text"> The app wasn\'t found in the list of installed apps.</string> <string name="user_is_not_allowed_dlg_title">Not allowed</string> <string name="user_is_not_allowed_dlg_text">The current user is not allowed to perform this uninstallation.</string> <string name="generic_error_dlg_title">Error</string> <string name="generic_error_dlg_text">App could not be uninstalled.</string> <string name="uninstall_application_title">Uninstall app</string> <string name="uninstall_update_title">Uninstall update</string> <string name="uninstall_activity_text"><xliff:g id="activity_name">%1$s</xliff:g> is part of the following app:</string> Loading src/com/android/packageinstaller/EventResultPersister.java +18 −15 Original line number Diff line number Diff line Loading @@ -79,6 +79,22 @@ class EventResultPersister { @GuardedBy("mLock") private boolean mIsPersistingStateValid; /** * @return a new event id. */ public int getNewId() throws OutOfIdsException { synchronized (mLock) { if (mCounter == Integer.MAX_VALUE) { throw new OutOfIdsException(); } mCounter++; writeState(); return mCounter - 1; } } /** Call back when a result is received. Observer is removed when onResult it called. */ interface EventResultObserver { void onResult(int status, int legacyStatus, @Nullable String message); Loading Loading @@ -253,20 +269,11 @@ class EventResultPersister { */ int addObserver(int id, @NonNull EventResultObserver observer) throws OutOfIdsException { boolean stateChanged = false; synchronized (mLock) { int resultIndex = -1; if (id == GENERATE_NEW_ID) { if (mCounter == Integer.MAX_VALUE) { throw new OutOfIdsException(); } else { id = mCounter; mCounter++; stateChanged = true; } id = getNewId(); } else { resultIndex = mResults.indexOfKey(id); } Loading @@ -277,14 +284,10 @@ class EventResultPersister { observer.onResult(result.status, result.legacyStatus, result.message); mResults.removeAt(resultIndex); stateChanged = true; writeState(); } else { mObservers.put(id, observer); } if (stateChanged) { writeState(); } } Loading Loading
AndroidManifest.xml +17 −1 Original line number Diff line number Diff line Loading @@ -95,10 +95,26 @@ </intent-filter> </activity> <receiver android:name=".UninstallEventReceiver" android:permission="android.permission.INSTALL_PACKAGES" android:exported="true"> <intent-filter android:priority="1"> <action android:name="com.android.packageinstaller.ACTION_UNINSTALL_COMMIT" /> </intent-filter> <intent-filter> <action android:name="android.intent.action.BOOT_COMPLETED" /> </intent-filter> </receiver> <activity android:name=".UninstallUninstalling" android:excludeFromRecents="true" android:theme="@style/AlertDialogActivity" android:exported="false" /> <receiver android:name=".UninstallFinish" android:exported="false" /> <activity android:name=".UninstallAppProgress" <activity android:name=".television.UninstallAppProgress" android:configChanges="mnc|mnc|touchscreen|navigation|screenLayout|screenSize|smallestScreenSize|orientation|locale|keyboard|keyboardHidden|fontScale|uiMode|layoutDirection|density" android:exported="false" /> Loading
res/layout/uninstall_progress.xml→res/layout-television/uninstall_progress.xml +0 −0 File moved. View file
res/values/strings.xml +2 −0 Original line number Diff line number Diff line Loading @@ -100,6 +100,8 @@ <string name="app_not_found_dlg_text"> The app wasn\'t found in the list of installed apps.</string> <string name="user_is_not_allowed_dlg_title">Not allowed</string> <string name="user_is_not_allowed_dlg_text">The current user is not allowed to perform this uninstallation.</string> <string name="generic_error_dlg_title">Error</string> <string name="generic_error_dlg_text">App could not be uninstalled.</string> <string name="uninstall_application_title">Uninstall app</string> <string name="uninstall_update_title">Uninstall update</string> <string name="uninstall_activity_text"><xliff:g id="activity_name">%1$s</xliff:g> is part of the following app:</string> Loading
src/com/android/packageinstaller/EventResultPersister.java +18 −15 Original line number Diff line number Diff line Loading @@ -79,6 +79,22 @@ class EventResultPersister { @GuardedBy("mLock") private boolean mIsPersistingStateValid; /** * @return a new event id. */ public int getNewId() throws OutOfIdsException { synchronized (mLock) { if (mCounter == Integer.MAX_VALUE) { throw new OutOfIdsException(); } mCounter++; writeState(); return mCounter - 1; } } /** Call back when a result is received. Observer is removed when onResult it called. */ interface EventResultObserver { void onResult(int status, int legacyStatus, @Nullable String message); Loading Loading @@ -253,20 +269,11 @@ class EventResultPersister { */ int addObserver(int id, @NonNull EventResultObserver observer) throws OutOfIdsException { boolean stateChanged = false; synchronized (mLock) { int resultIndex = -1; if (id == GENERATE_NEW_ID) { if (mCounter == Integer.MAX_VALUE) { throw new OutOfIdsException(); } else { id = mCounter; mCounter++; stateChanged = true; } id = getNewId(); } else { resultIndex = mResults.indexOfKey(id); } Loading @@ -277,14 +284,10 @@ class EventResultPersister { observer.onResult(result.status, result.legacyStatus, result.message); mResults.removeAt(resultIndex); stateChanged = true; writeState(); } else { mObservers.put(id, observer); } if (stateChanged) { writeState(); } } Loading