diff options
author | Fyodor Kupolov <fkupolov@google.com> | 2016-03-09 14:55:23 -0800 |
---|---|---|
committer | Fyodor Kupolov <fkupolov@google.com> | 2016-03-22 12:16:33 -0700 |
commit | 10f852cba8be8b26c9f4f7c0aa57aab01f19c3c1 (patch) | |
tree | 3761c503a534dc174df1384f1373d16d38b2166d /src | |
parent | 5a86422a1e8c9fad2007e338dc029943c182fe82 (diff) | |
download | android_packages_apps_PackageInstaller-10f852cba8be8b26c9f4f7c0aa57aab01f19c3c1.tar.gz android_packages_apps_PackageInstaller-10f852cba8be8b26c9f4f7c0aa57aab01f19c3c1.tar.bz2 android_packages_apps_PackageInstaller-10f852cba8be8b26c9f4f7c0aa57aab01f19c3c1.zip |
Added "Manage users" button
Show "Manage users" button when a secondary user is blocking the uninstall.
Bug: 24616123
Change-Id: I61f1d9814dccc9f9e8acbce97d8ef681f5ec8944
Diffstat (limited to 'src')
-rwxr-xr-x | src/com/android/packageinstaller/UninstallAppProgress.java | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/com/android/packageinstaller/UninstallAppProgress.java b/src/com/android/packageinstaller/UninstallAppProgress.java index 4c039051..f1c569a7 100755 --- a/src/com/android/packageinstaller/UninstallAppProgress.java +++ b/src/com/android/packageinstaller/UninstallAppProgress.java @@ -35,6 +35,7 @@ import android.os.RemoteException; import android.os.ServiceManager; import android.os.UserHandle; import android.os.UserManager; +import android.provider.Settings; import android.util.Log; import android.view.KeyEvent; import android.view.View; @@ -64,6 +65,7 @@ public class UninstallAppProgress extends Activity implements OnClickListener { private TextView mStatusTextView; private Button mOkButton; private Button mDeviceManagerButton; + private Button mUsersButton; private ProgressBar mProgressBar; private View mOkPanel; private volatile int mResultCode = -1; @@ -180,6 +182,7 @@ public class UninstallAppProgress extends Activity implements OnClickListener { mDeviceManagerButton.setVisibility(View.VISIBLE); } else { mDeviceManagerButton.setVisibility(View.GONE); + mUsersButton.setVisibility(View.VISIBLE); } // TODO: b/25442806 if (blockingUserId == UserHandle.USER_SYSTEM) { @@ -260,6 +263,7 @@ public class UninstallAppProgress extends Activity implements OnClickListener { mStatusTextView = (TextView) findViewById(R.id.center_text); mStatusTextView.setText(R.string.uninstalling); mDeviceManagerButton = (Button) findViewById(R.id.device_manager_button); + mUsersButton = (Button) findViewById(R.id.users_button); mDeviceManagerButton.setVisibility(View.GONE); mDeviceManagerButton.setOnClickListener(new OnClickListener() { @Override @@ -272,6 +276,16 @@ public class UninstallAppProgress extends Activity implements OnClickListener { finish(); } }); + mUsersButton.setVisibility(View.GONE); + mUsersButton.setOnClickListener(new OnClickListener() { + @Override + public void onClick(View v) { + Intent intent = new Intent(Settings.ACTION_USER_SETTINGS); + intent.setFlags(Intent.FLAG_ACTIVITY_NO_HISTORY | Intent.FLAG_ACTIVITY_NEW_TASK); + startActivity(intent); + finish(); + } + }); mProgressBar = (ProgressBar) findViewById(R.id.progress_bar); mProgressBar.setIndeterminate(true); // Hide button till progress is being displayed |